rcar_gen3: plat: Print DRAM bank size in MiB if below 1 GiB
authorMarek Vasut <[email protected]>
Sat, 30 Mar 2019 03:01:41 +0000 (04:01 +0100)
committerMarek Vasut <[email protected]>
Tue, 2 Apr 2019 01:40:51 +0000 (03:40 +0200)
Print the DRAM bank size in MiB instead of GiB in case the bank size
is smaller than 1 GiB. This prevents printing zeroes on systems with
small DRAM sizes.

Signed-off-by: Marek Vasut <[email protected]>
plat/renesas/rcar/bl2_plat_setup.c

index de8588c63485c2c98cdf2ec6189161522db801e4..7442942c77f9fda47f09c8dfc2f82effb34a27ea 100644 (file)
@@ -482,8 +482,10 @@ static void bl2_advertise_dram_entries(uint64_t dram_config[8])
                if (!size)
                        continue;
 
-               NOTICE("BL2: CH%d: %llx - %llx, %lld GiB\n",
-                       chan, start, start + size - 1, size >> 30);
+               NOTICE("BL2: CH%d: %llx - %llx, %lld %siB\n",
+                       chan, start, start + size - 1,
+                       (size >> 30) ? : size >> 20,
+                       (size >> 30) ? "G" : "M");
        }
 
        /*